<div [formGroup]="form" style="padding:5px;">
    <label [attr.for]="user.name">{{user.name}}</label>
  
    <ng-container *ngIf="user.id%2===0; else elseTemplate">
      <input [formControlName]="user.name" [id]="user.name" type="text" class="form-control">
    </ng-container>
    <ng-template #elseTemplate>
        <input [formControlName]="user.name" [id]="user.name" type="text" class="form-control">
    </ng-template>

    <span class="errorMessage" *ngIf="(isDirty || isTouched) && !isValid">{{error | json}}</span>
  </div>